﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using BUS;
using DTO;
using System.Collections.Generic;

public partial class Search : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        List<LoaiSanPhamDto> loaisanpham = LoaiSanPhamBus.LayDanhSachLoaiSanPham();
        cmbLoai.DataSource = loaisanpham;
        cmbLoai.DataValueField = "ID";
        cmbLoai.DataTextField = "tenloaisanpham";
        cmbLoai.DataBind();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        String ten = txtTen.Text;
        String loai = cmbLoai.SelectedValue;
        String giaTu = cmbGiaTu.SelectedValue;
        String giaDen = cmbGiaDen.SelectedValue;
        String khuyenmai = chkKhuyenMai.Checked.ToString();
        Response.Redirect("KetQuaTimKiemSanPhamNC.aspx?currentPage=1&keyword=" + ten
          + "&loai=" + loai
          + "&giaTu=" + giaTu
          + "&giaDen=" + giaDen
          + "&khuyenmai=" + khuyenmai);
    }
}
